package com.lvc.fotolivro.client;

import com.google.gwt.core.client.GWT;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.Cursor;
import com.smartgwt.client.types.DragAppearance;
import com.smartgwt.client.widgets.Img;

/**
 * Esta classe representa uma imagem que pode ser movida
 *  
 * @author Larissa Nepomuceno Costa
 * @version 1
 * @since 08/10/2012
 */
public class MyDragPhoto extends Img {

	public MyDragPhoto(String caminho) {
		setSrc(GWT.getHostPageBaseURL() + caminho);
		setCursor(Cursor.MOVE);
		setCanDrag(true);
		setCanDrop(true);
		setDragAppearance(DragAppearance.TARGET);
		setLayoutAlign(Alignment.CENTER);
		setCanDragReposition(true);
		setKeepInParentRect(true);
	}
	
}